package com.ngc.mall.core.enumeration;

import java.util.stream.Stream;

/**
 *
 * 消息通知类型
 * @author: chenxiaolin
 * @date 2023/11/8 15:13
**/
public enum NoticeType {
    SINGLE_CHAT(1,"私信"),
    ALL_CHAT(2,"公告");
    private Integer value;

    NoticeType(int value,String description) {
        this.value=value;
    }

    public Integer getValue(){
        return this.value;
    }

    public static NoticeType toType(int value){
        return Stream.of(NoticeType.values()).filter(c->c.value==value).findAny().orElse(null);
    }

}
